fc52d5058887e05545ff8daf1f3d0a65ac68669b,src/services/org/opennms/netmgt/collectd/JMXCollector.java,JMXCollector,initialize,#Map#,204
Before Change
log.fatal("initialize: Failed to load data collection configuration",ex);
throw new UndeclaredThrowableException(ex);
} catch (IOException ex) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Failed to load data collection configuration",ex);
throw new UndeclaredThrowableException(ex);
}
// Make sure we can connect to the database
//
java.sql.Connection ctest = null;
try {
DatabaseConnectionFactory.init();
ctest = DatabaseConnectionFactory.getInstance().getConnection();
} catch (IOException ie) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: IOException getting database connection", ie);
throw new UndeclaredThrowableException(ie);
} catch (MarshalException me) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Marshall Exception getting database connection",me);
throw new UndeclaredThrowableException(me);
} catch (ValidationException ve) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Validation Exception getting database connection",ve);
throw new UndeclaredThrowableException(ve);
} catch (SQLException sqlE) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Failed getting connection to the database.",sqlE);
throw new UndeclaredThrowableException(sqlE);
} catch (PropertyVetoException e) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Failed getting connection to the database.",e);
throw new UndeclaredThrowableException(e);
} catch (ClassNotFoundException cnfE) {
if (log.isEnabledFor(Priority.FATAL))
log.fatal("initialize: Failed loading database driver.", cnfE);
throw new UndeclaredThrowableException(cnfE);
} finally {
After Change
try {
JMXDataCollectionConfigFactory.reload();
} catch (MarshalException e) {
log.fatal("initialize: Failed to load data collection configuration",
e);
throw new UndeclaredThrowableException(e);
} catch (ValidationException e) {
log.fatal("initialize: Failed to load data collection configuration",
e);
throw new UndeclaredThrowableException(e);
} catch (IOException e) {
log.fatal("initialize: Failed to load data collection configuration",
e);
throw new UndeclaredThrowableException(e);
}
// Make sure we can connect to the database
java.sql.Connection ctest = null;
try {
DatabaseConnectionFactory.init();
ctest = DatabaseConnectionFactory.getInstance().getConnection();
} catch (IOException e) {
log.fatal("initialize: IOException getting database connection",
e);
throw new UndeclaredThrowableException(e);
} catch (MarshalException e) {
log.fatal("initialize: Marshall Exception getting database "
+ "connection", e);
throw new UndeclaredThrowableException(e);
} catch (ValidationException e) {
log.fatal("initialize: Validation Exception getting database "
+ "connection", e);
throw new UndeclaredThrowableException(e);
} catch (SQLException e) {
log.fatal("initialize: Failed getting connection to the database.",
e);
throw new UndeclaredThrowableException(e);
} catch (PropertyVetoException e) {
log.fatal("initialize: Failed getting connection to the database.",
e);
throw new UndeclaredThrowableException(e);
} catch (ClassNotFoundException e) {
log.fatal("initialize: Failed loading database driver.", e);
throw new UndeclaredThrowableException(e);
} finally {
if (ctest != null) {